<div class="center_news">
    <div class="center_news_tt">
        <ul>
            <li><a class="cr_news" href="<?php echo get_link("news"); ?>" title="Tin tức">[Tin tức]</a> | <a href="<?php echo get_link('news', 'archive', $param[1]); ?>" title="<?php echo $param[1]; ?>"><?php echo date("m/Y", strtotime($param[1]));?></a></li>
            <li class="datetime_hd"><?php echo get_date_vn_now();?></li>
        </ul>
    </div>
    <?php
    //truyen vao tag id va page
    $rsNews = getNewsArchiveWithPaging($param[1],intval($param[2]));
    $i=0;
    while($news=$db->fetch_array($rsNews["news"])) {
        $i++;

        if($i==1) {
            $thumb = get_news_thumb($news["image"],"176-176");
            
            ?>

    <div class="news_top">
        <ul>
            <li>
                <a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>" class="img_view"><img src="<?php echo SITE_URL.$thumb; ?>" /></a>

                <h2><a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>"><?php echo $news["title"]; ?></a></h2><br>

                <p><?php echo get_my_date($news["create_date"]); ?></p>

                        <?php echo sum_str($news["description"],220); ?>

                <p class="viewmore"><a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>" class="<?php echo $class; ?>">[Xem thêm]</a><img src="<?php echo SITE_IMAGES_URL; ?>/arrow3.gif" /></p>
            </li>
        </ul>
    </div>

        <?php }else {
            $lastNewsCreateDate = $news["create_date"];
            $thumb = get_news_thumb($news["image"],"100-100");?>


    <div class="news_top2">
        <ul>
            <li>
                <a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>" class="thumb_news"><img src="<?php echo SITE_URL.$thumb; ?>" /></a>

                <h2><a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>"><?php echo $news["title"]; ?></a></h2><br>

                <p><?php echo get_my_date($news["create_date"]); ?></p>

                        <?php echo sum_str($news["description"],220); ?>

                <p class="viewmore"><a href="<?php echo get_link("news","detail",$news["title_link"]); ?>" title="<?php echo htmlentities_utf8($news["title"]); ?>" class="<?php echo $class; ?>">[Xem thêm]</a><img src="<?php echo SITE_IMAGES_URL; ?>/arrow3.gif" /></p>
            </li>
        </ul>
    </div>

        <?php } ?>
    <?php } ?>

    <div class="news_paging">
        <?php
        if(intval($rsNews["total"])>1 && !empty($params[1])) {
            echo paging($rsNews["page"],$rsNews["total"],get_link_page('news','archive',$param[1]));
        }
        ?>
    </div>
    <?php
    $rsLastOtherNews = getOrtherNewsArchive($lastNewsCreateDate);
    if($db->num_rows($rsLastOtherNews)) {
        ?>
    <div class="othernew_title"><img src="/images/icon2.gif" />[Các bài đã đăng]</div>
    <div class="link_othernews">
            <?php
            while($otherNews=$db->fetch_array($rsLastOtherNews)) {
                ?>
        <img src="/images/point2.gif" alt="<?php echo $otherNews['title'];?>" /><a href="<?php echo get_link("news","detail",$otherNews["title_link"]); ?>" title="<?php echo $otherNews['title'];?>"><?php echo $otherNews['title'];?> (<?php echo get_my_date($otherNews["create_date"]); ?>)</a><br />
            <?php }?>
    </div>
    <?php }?>
</div>